package com.test.springai.service;

import java.util.function.Function;

/**
 * Created with IntelliJ IDEA.
 *
 * @description:
 * @author: liuziyang
 * @since: 8/20/25 9:25 AM
 * @modifiedBy:
 * @version: 1.0
 */
public class RecruitServiceFunction
    implements Function<RecruitServiceFunction.Request, RecruitServiceFunction.Response> {
  /**
   * Apply response.
   *
   * @param request the request
   * @return the response
   */
  @Override
  public Response apply(Request request) {
    String position = "未知";
    if (request.name.contains("张三")) {
      position = "算法工程师";
    }
    return new Response(position);
  }

  public record Request(String name) {}

  public record Response(String position) {}
}
